Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verifying Client Permissions #25

Open
wants to merge 1 commit into
base: centos-ci
Choose a base branch
from

Conversation

mpadariy
Copy link

Adding CLIENT{...} in NFS-Server export file
Cross checking the parameters at the client end

Signed-off-by: Mohammed Azhar Padariyakam [email protected]

Adding CLIENT{...} in NFS-Server export file
Cross checking the parameters at the client end

Signed-off-by: Mohammed Azhar Padariyakam <[email protected]>
echo "SUCCESS"
else
echo "FAILED ON WRITING RIGHTS"
#exit ret
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do these indicate failure to the test runner? Is the output parsed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dang
Sorry, The comment line #exit ret should be uncommentd ... :(

echo "FAILURE Since Write Permissions Were Not Blocked To The Client"
#exit ret
else
echo "SUCCESS ON WRITE PERMISSIONS FAILURE"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If output is parsed, this says FAILURE, and so will probably trigger a failure. Either way, this message can probably be cleaned up.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output is not parsed instead the return code is checked ....

echo "FAILURE Since v4.0 Permissions Were Not Given To The Client"
#exit ret
else
echo "SUCCESS ON v4.0 MOUNT FAILURE"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, here, this message should probably not say FAILURE in is. Maybe "SUCCESS - v4.0 mount correctly rejected" or something?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dang
Ok , I will fix that everywhere :)

echo "FAILURE Since v4.1 Permissions Were Not Given To The Client"
#exit ret
else
echo "SUCCESS ON v4.1 MOUNT FAILURE"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too.

echo "FAILURE Since v3 Permissions Were Not Given To The Client"
#exit ret
else
echo "SUCCESS ON v3 MOUNT FAILURE"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too...

systemctl stop firewalld || service iptables stop

# TODO: SELinux prevents creating special files on Gluster bricks (bz#1331561)
setenforce 0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already done on line 46

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dang
Copy-Paste Typo ... :-/


echo "=======CLIENTBLOCK========="
cat clientBlock.txt
sed -i '19e cat clientBlock.txt' ${conf_file}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might fail if the default config file generated by create-ganesha-export.sh changes. It might be better to look for a certain line in the file and append after it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dang ... Yea .. got it .. :)

#Parsing export id from volume export conf file
export_id=$(grep 'Export_Id' ${conf_file} | sed 's/^[[:space:]]*Export_Id.*=[[:space:]]*\([0-9]*\).*/\1/')

sed -i '22s/.*/\t\tAccess_type = "RW";/' ${conf_file}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should search-and-replace for the correct lines, I think, rather than changing a specific line by number.

#Parsing export id from volume export conf file
export_id=$(grep 'Export_Id' ${conf_file} | sed 's/^[[:space:]]*Export_Id.*=[[:space:]]*\([0-9]*\).*/\1/')

sed -i '23s/.*/\t\tProtocols = "4";/' ${conf_file}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this...

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what the code is trying to do, but does "ganesha_conf" script shipped with ganesha2.5 help? It should add/replace/delete existing config entries. See ./src/scripts/ganeshactl/ganesha_conf.man for details.

#Parsing export id from volume export conf file
export_id=$(grep 'Export_Id' ${conf_file} | sed 's/^[[:space:]]*Export_Id.*=[[:space:]]*\([0-9]*\).*/\1/')

sed -i '21s/.*/\t\tSquash = "root_squash";/' ${conf_file}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for these.

@rakshithakamath94 rakshithakamath94 force-pushed the centos-ci branch 28 times, most recently from 8d13406 to 8ed5d89 Compare June 20, 2023 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants